import request from "@/utils/request";

// 查询产品订单列表
export function listOrder(query) {
  return request({
    url: "/order/list",
    method: "get",
    params: query,
  });
}

// 查询产品订单详细
export function getOrder(orderId) {
  return request({
    url: "/order/" + orderId,
    method: "get",
  });
}

// 新增产品订单
export function addOrder(data) {
  return request({
    url: "/order",
    method: "post",
    data: data,
  });
}

// 修改产品订单
export function updateOrder(data) {
  return request({
    url: "/order",
    method: "put",
    data: data,
  });
}

// 删除产品订单
export function delOrder(orderId) {
  return request({
    url: "/order/" + orderId,
    method: "delete",
  });
}
